// CompareMain.cpp

#include <iostream>
#include "System.h"

int main(int argc, char * argv[]) {
	if (argc < 3 || argc > 4) {
		cerr << "Usage: compare [-d] f1 f2\n";
		exit (-1);
	}

	string option = "no lines";
	string f1 = argv[1];
	string f2 = argv[2];

	if (argc == 4) {
		option = argv[1];
		if (option != "-d") {
			cerr << "Unknown option\n";
			exit(-1);
		}

		f1 = argv[2];
		f2 = argv[3];
	}

	if (System::compare(f1, f2, option) ) {
		cout << "files " << f1 << " en " << f2 << " zijn identiek\n";
	}
	else {
		cout << "files " << f1 << " en " << f2 << " zijn  NIET identiek\n";
	}

	return 0;
}
